<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>D:\Projects\ChartAPI\RaphaelChartLibrary\ChartLibrary.js</title><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script><script language=JavaScript src="../javascript/prettify.js"></script></head><body class="FramedContentPage" onLoad="NDOnLoad();prettyPrint();"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>

<!--  Generated by Natural Docs, version 1.51 -->
<!--  http://www.naturaldocs.org  -->

<!-- saved from url=(0026)http://www.naturaldocs.org -->




<div id=Content><div class="CFile"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="ChartLibrary.js"></a>ChartLibrary.js</h1><div class=CBody><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#ChartLibrary.js" >ChartLibrary.js</a></td><td class=SDescription></td></tr><tr class="SGroup"><td class=SEntry><a href="#Variables" >Variables</a></td><td class=SDescription></td></tr><tr class="SVariable SIndent1 SMarked"><td class=SEntry><a href="#paper" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">paper</a></td><td class=SDescription>Keeps the Paper.</td></tr><tr class="SVariable SIndent1"><td class=SEntry><a href="#org" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">org</a></td><td class=SDescription>init the Joint Diagram</td></tr><tr class="SVariable SIndent1 SMarked"><td class=SEntry><a href="#canvasWidth" >canvasWidth</a></td><td class=SDescription>Keeps canvas width.</td></tr><tr class="SVariable SIndent1"><td class=SEntry><a href="#canvasHeight" >canvasHeight</a></td><td class=SDescription>Keeps canvas height.</td></tr><tr class="SClass"><td class=SEntry><a href="#ChartLibrary" >ChartLibrary</a></td><td class=SDescription>A class that manages Chart Functions</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#ChartLibrary.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#ChartLibrary.init" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">init</a></td><td class=SDescription>inti the SVG Drawing Canvas.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#ChartLibrary.generateTree" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">generateTree</a></td><td class=SDescription>inti the SVG Drawing Canvas.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#ChartLibrary.drawTree" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">drawTree</a></td><td class=SDescription>Draw the tree with the provided instance</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#ChartLibrary.inti_the_SVG_Drawing_Canvas" >inti the SVG Drawing Canvas.</a></td><td class=SDescription>Node Object which will be created on canvas</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#ChartLibrary.MakeAncestorsOf" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">MakeAncestorsOf</a></td><td class=SDescription>Create Relationships :   Ancestors of node n are all the nodes that are on some path  to n from root</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#ChartLibrary.drawNodes" id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')">drawNodes</a></td><td class=SDescription>Draw tree nodes</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#ChartLibrary.Joint.arrows.square" id=link8 onMouseOver="ShowTip(event, 'tt8', 'link8')" onMouseOut="HideTip('tt8')">Joint.<wbr>arrows.<wbr>square</a></td><td class=SDescription>Draw square arrow</td></tr><tr class="SClass"><td class=SEntry><a href="#Node" >Node</a></td><td class=SDescription>A class data strecture for the node object</td></tr><tr class="SClass"><td class=SEntry><a href="#Rectangle" >Rectangle</a></td><td class=SDescription>A class data strecture for the Rectangle</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Rectangle.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Rectangle.Support_Objects" >Support Objects</a></td><td class=SDescription>Draw square arrow</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="Variables"></a>Variables</h3></div></div>

<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="paper"></a>paper</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">var paper</td></tr></table></blockquote><p>Keeps the Paper.</p></div></div></div>

<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="org"></a>org</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">var org</td></tr></table></blockquote><p>init the Joint Diagram</p></div></div></div>

<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="canvasWidth"></a>canvasWidth</h3><div class=CBody><p>Keeps canvas width.</p></div></div></div>

<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="canvasHeight"></a>canvasHeight</h3><div class=CBody><p>Keeps canvas height.</p></div></div></div>

<div class="CClass"><div class=CTopic><h2 class=CTitle><a name="ChartLibrary"></a>ChartLibrary</h2><div class=CBody><p>A class that manages Chart Functions</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SGroup"><td class=SEntry><a href="#ChartLibrary.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#ChartLibrary.init" id=link9 onMouseOver="ShowTip(event, 'tt3', 'link9')" onMouseOut="HideTip('tt3')">init</a></td><td class=SDescription>inti the SVG Drawing Canvas.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#ChartLibrary.generateTree" id=link10 onMouseOver="ShowTip(event, 'tt4', 'link10')" onMouseOut="HideTip('tt4')">generateTree</a></td><td class=SDescription>inti the SVG Drawing Canvas.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#ChartLibrary.drawTree" id=link11 onMouseOver="ShowTip(event, 'tt5', 'link11')" onMouseOut="HideTip('tt5')">drawTree</a></td><td class=SDescription>Draw the tree with the provided instance</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#ChartLibrary.inti_the_SVG_Drawing_Canvas" >inti the SVG Drawing Canvas.</a></td><td class=SDescription>Node Object which will be created on canvas</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#ChartLibrary.MakeAncestorsOf" id=link12 onMouseOver="ShowTip(event, 'tt6', 'link12')" onMouseOut="HideTip('tt6')">MakeAncestorsOf</a></td><td class=SDescription>Create Relationships :   Ancestors of node n are all the nodes that are on some path  to n from root</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#ChartLibrary.drawNodes" id=link13 onMouseOver="ShowTip(event, 'tt7', 'link13')" onMouseOut="HideTip('tt7')">drawNodes</a></td><td class=SDescription>Draw tree nodes</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#ChartLibrary.Joint.arrows.square" id=link14 onMouseOver="ShowTip(event, 'tt8', 'link14')" onMouseOut="HideTip('tt8')">Joint.<wbr>arrows.<wbr>square</a></td><td class=SDescription>Draw square arrow</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="ChartLibrary.Functions"></a>Functions</h3></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="ChartLibrary.init"></a>init</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>init: function (</td><td class="PParameter  prettyprint " nowrap>id,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>w,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>h</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>inti the SVG Drawing Canvas.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>id</td><td class=CDLDescription>&lt;div&gt; tag which canvas is draw.</td></tr><tr><td class=CDLEntry>w</td><td class=CDLDescription>Canvas width</td></tr><tr><td class=CDLEntry>h</td><td class=CDLDescription>Canvas height</td></tr></table><h4 class=CHeading>Returns</h4><p>Returns true if canvas init successfully.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="ChartLibrary.generateTree"></a>generateTree</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>generateTree: function (</td><td class="PParameter  prettyprint " nowrap>treeData</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>inti the SVG Drawing Canvas.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>treeData</td><td class=CDLDescription>Tree Node</td></tr></table><h4 class=CHeading>Returns</h4><p>Returns true if canvas init successfully.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="ChartLibrary.drawTree"></a>drawTree</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">drawTree: function ()</td></tr></table></blockquote><p>Draw the tree with the provided instance</p><p>Parameters: None</p><p>Returns: Draws the Tree</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="ChartLibrary.inti_the_SVG_Drawing_Canvas"></a>inti the SVG Drawing Canvas.</h3><div class=CBody><p>Node Object which will be created on canvas</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>nodeItem</td><td class=CDLDescription>node</td></tr></table><h4 class=CHeading>Returns</h4><p>Returns Created Node object from Raphael.js.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="ChartLibrary.MakeAncestorsOf"></a>MakeAncestorsOf</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>MakeAncestorsOf: function (</td><td class="PParameter  prettyprint " nowrap>Parent,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>Child,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>Label,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>IsHighlight</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Create Relationships :   Ancestors of node n are all the nodes that are on some path  to n from root</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>Parent</td><td class=CDLDescription>Parent Node</td></tr><tr><td class=CDLEntry>Child</td><td class=CDLDescription>Child Node</td></tr><tr><td class=CDLEntry>Label</td><td class=CDLDescription>Relationship label</td></tr><tr><td class=CDLEntry>IsHighlight</td><td class=CDLDescription>is Relationship is Highlighted</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="ChartLibrary.drawNodes"></a>drawNodes</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>drawNodes: function (</td><td class="PParameter  prettyprint " nowrap>node</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Draw tree nodes</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>node</td><td class=CDLDescription>node to draw in the canvas</td></tr></table><h4 class=CHeading>Returns</h4><p>Draws the node object in svg canvas</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="ChartLibrary.Joint.arrows.square"></a>Joint.<wbr>arrows.<wbr>square</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>Joint.arrows.square = function (</td><td class="PParameter  prettyprint " nowrap>size</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Draw square arrow</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>size</td><td class=CDLDescription>size of the object</td></tr></table><h4 class=CHeading>Returns</h4><p>Draws the node head object in svg canvas</p></div></div></div>

<div class="CClass"><div class=CTopic><h2 class=CTitle><a name="Node"></a>Node</h2><div class=CBody><p>A class data strecture for the node object</p></div></div></div>

<div class="CClass"><div class=CTopic><h2 class=CTitle><a name="Rectangle"></a>Rectangle</h2><div class=CBody><p>A class data strecture for the Rectangle</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SGroup"><td class=SEntry><a href="#Rectangle.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#Rectangle.Support_Objects" >Support Objects</a></td><td class=SDescription>Draw square arrow</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="Rectangle.Functions"></a>Functions</h3></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Rectangle.Support_Objects"></a>Support Objects</h3><div class=CBody><p>Draw square arrow</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>size</td><td class=CDLDescription>size of the object</td></tr></table><h4 class=CHeading>Returns</h4><p>Draws the node head object in svg canvas</p></div></div></div>

</div><!--Content-->



<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt1"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">var paper</td></tr></table></blockquote>Keeps the Paper.</div></div><div class=CToolTip id="tt2"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">var org</td></tr></table></blockquote>init the Joint Diagram</div></div><div class=CToolTip id="tt3"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>init: function (</td><td class="PParameter  prettyprint " nowrap>id,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>w,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>h</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>inti the SVG Drawing Canvas.</div></div><div class=CToolTip id="tt4"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>generateTree: function (</td><td class="PParameter  prettyprint " nowrap>treeData</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>inti the SVG Drawing Canvas.</div></div><div class=CToolTip id="tt5"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">drawTree: function ()</td></tr></table></blockquote>Draw the tree with the provided instance</div></div><div class=CToolTip id="tt6"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>MakeAncestorsOf: function (</td><td class="PParameter  prettyprint " nowrap>Parent,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>Child,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>Label,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>IsHighlight</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Create Relationships :   Ancestors of node n are all the nodes that are on some path  to n from root</div></div><div class=CToolTip id="tt7"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>drawNodes: function (</td><td class="PParameter  prettyprint " nowrap>node</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Draw tree nodes</div></div><div class=CToolTip id="tt8"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>Joint.arrows.square = function (</td><td class="PParameter  prettyprint " nowrap>size</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Draw square arrow</div></div><!--END_ND_TOOLTIPS-->

<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>